package com.smartstate.dataManagement.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.smartstate.dataManagement.entity.LoginLog;
import com.smartstate.dataManagement.entity.Role;
import com.smartstate.dataManagement.entity.UserAndRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @author huanghuoxin
 */
@Mapper
public interface LoginLogMapper  extends BaseMapper<LoginLog> {
    List<LoginLog> getListByNameOrDept(@Param("nickname") String nickname, @Param("department") String department);

    @Delete("delete from login_log where id=#{id}")
    int deleteLogByID(@Param("id") String id);

    int batchDelByIds(List<String> ids);

    List<Role>  getRoleNameById(List<LoginLog> loginLogs);

}
